home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 050 / scratt.pdr < prev    next >
Text File  |  1985-08-10  |  2KB  |  64 lines

  1. Procedure ScrAtt (AttCode: Integer);
  2.  
  3.  {╔════════════════════════════════════════╗
  4.   ║                                        ║
  5.   ║   -- For IBM Monochrome Display --     ║
  6.   ║                                        ║
  7.   ║   Takes an integer value of 1 to 11    ║
  8.   ║   and sets the character attribute     ║
  9.   ║   to one of the following...           ║
  10.   ║                                        ║
  11.   ║   1 - Underlined - Dim - Blinking      ║
  12.   ║   2 - Underlined - Dim                 ║
  13.   ║   3 - Underlined - Bright - Blinking   ║
  14.   ║   4 - Underlined - Bright              ║
  15.   ║   5 - Reverse video - Blinking         ║
  16.   ║   6 - Reverse video                    ║
  17.   ║   7 - Normal - Dim - Blinking          ║
  18.   ║   8 - Normal - Dim                     ║
  19.   ║   9 - Normal - High - Blinking         ║
  20.   ║  10 - Normal - High                    ║
  21.   ║  11 - Invisible character              ║
  22.   ║                                        ║
  23.   ║            e.g. ScrAtt(8);             ║
  24.   ║                                        ║
  25.   ║                                        ║
  26.   ║     Written by:  John Tevik            ║
  27.   ║                  5120 Oakley           ║
  28.   ║                  Duluth, MN 55804      ║
  29.   ║                                        ║
  30.   ╚════════════════════════════════════════╝}
  31.  
  32.   Var
  33.     B, C: 1..9;
  34.     Flash: Boolean;
  35.  
  36.   Begin  {ScrAtt}
  37.     If (AttCode In [1,3,5,7,9]) Then
  38.       Flash := True
  39.     Else
  40.       Flash := False;
  41.     If (AttCode In [5,6]) Then
  42.       B := 15
  43.     Else If (AttCode = 11) Then
  44.       B := 8
  45.     Else
  46.       B := 9;
  47.     Case AttCode Of
  48.       1,2    : C := 1;
  49.       3,4    : C := 9;
  50.       5,6,11 : C := 8;
  51.       7,8    : C := 7;
  52.       9,10   : C := 10
  53.     End;
  54.     If Flash Then
  55.       Begin
  56.         TextColor (C + Blink);
  57.         TextBackground (B)
  58.       End
  59.     Else
  60.       begin
  61.         TextColor (C);
  62.         TextBackground (B)
  63.       End
  64.   End;  {scratt}